package com.znzz.course.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 手机号码正则匹配
 * @Author by DHF
 * @Date 2022/04/2022/4/17 16:51
 * @Version 1.0
 */
public class SMSUtil {
    /**
     * 正则匹配手机号码:
     */
    public static boolean checkTel(String tel){
        Pattern p = Pattern.compile("^[1][3,4,5,7,8,9][0-9]{9}$");
        Matcher matcher = p.matcher(tel);
        return matcher.matches();
    }
}
